package game

const (
	// 战斗
	// 从playbook统计项中
	PlaybookSource SourceKey = iota
	// 从playbook单个用户统计项
	PlaybookUserSource

	// 从用户统计项中
	AllSource
	DailySource
	WeeklySource
	MonthlySource
)

func (factor *Factor) Judge(source map[string]int32) bool {
	v, ok := source[factor.Key]
	//fmt.Println(factor.Key, factor.Value, v)
	if !ok {
		return false
	}
	if v >= factor.Value {
		return true
	}
	return false
}
